home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.0 / CIncludes / SoundComponents.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-18  |  15.9 KB  |  430 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        SoundComponents.h
  3.  
  4.      Contains:    Sound Components Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __SOUNDCOMPONENTS__
  21. #define __SOUNDCOMPONENTS__
  22.  
  23. #ifndef rez
  24.  
  25. #ifndef __TYPES__
  26. #include <Types.h>
  27. #endif
  28. /*    #include <ConditionalMacros.h>                                */
  29.  
  30. #ifndef __COMPONENTS__
  31. #include <Components.h>
  32. #endif
  33. /*    #include <MixedMode.h>                                        */
  34.  
  35. #ifndef __SOUND__
  36. #include <Sound.h>
  37. #endif
  38.  
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42.  
  43. #if PRAGMA_ALIGN_SUPPORTED
  44. #pragma options align=mac68k
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT_SUPPORTED
  48. #pragma import on
  49. #endif
  50.  
  51. #endif /* rez */
  52. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  53. /* constants*/
  54. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  55.  
  56.  
  57. /*sound component types and subtypes*/
  58. #define kNoSoundComponentType            '****'
  59.  
  60.  
  61. #define kSoundHardwareType                'sdev'        /*component type for sound devices*/
  62. #define kSoundComponentType                'sift'
  63. #define     kRate8SubType                'ratb'        /*8-bit rate converter*/
  64. #define     kRate16SubType                'ratw'        /*16-bit rate converter*/
  65. #define kConverterSubType                'conv'        /*sample format converter*/
  66. #define kSndSourceSubType                'sour'        /*generic source component*/
  67.  
  68.  
  69. #define kMixerType                        'mixr'
  70. #define     kMixer8SubType                'mixb'        /*8-bit mixer*/
  71. #define     kMixer16SubType                'mixw'        /*16-bit mixer*/
  72.  
  73.  
  74. #define kSoundOutputDeviceType            'sdev'        /*sound output component*/
  75. #define        kClassicSubType                'clas'        /*classic hardware, i.e. Mac Plus*/
  76. #define     kASCSubType                    'asc '        /*Apple Sound Chip device*/
  77. #define     kDSPSubType                    'dsp '        /*DSP device*/
  78. #define     kAwacsSubType                'awac'        /*Another of Will's Audio Chips device*/
  79. #define     kGCAwacsSubType                'awgc'        /*Awacs audio with Grand Central DMA*/
  80. #define     kSingerSubType                'sing'        /*Singer (via Whitney) based sound*/
  81. #define     kSinger2SubType                'sng2'        /*Singer 2 (via Whitney) for Acme*/
  82.  
  83.  
  84. #define kSoundCompressor                'scom'
  85. #define kSoundDecompressor                'sdec'
  86. #define     kMace3SubType                'MAC3'        /*MACE 3:1*/
  87. #define     kMace6SubType                'MAC6'        /*MACE 6:1*/
  88. #define     kCDXA4SubType                'cdx4'        /*CD/XA 4:1*/
  89. #define     kCDXA2SubType                'cdx2'        /*CD/XA 2:1*/
  90. #define     kIMA4SubType                'ima4'        /*IMA 4:1*/
  91. #define     kULawSubType                'ulaw'        /*µLaw 2:1*/
  92. #define        kLittleEndianSubType        'sowt'        /*Little-endian*/
  93.  
  94.  
  95. /*Audio components and sub-types*/
  96. #define kAudioComponentType                'adio'
  97. #define        kAwacsPhoneSubType            'hphn'
  98. #define        kAudioVisionSpeakerSubType    'telc'
  99. #define        kAudioVisionHeadphoneSubType 'telh'
  100. #define        kSonyTunerSubType            'tvav'
  101.  
  102.  
  103. /*features flags*/
  104. #define k8BitRawIn                    (1 << 0)    /*data description*/
  105. #define k8BitTwosIn                    (1 << 1)
  106. #define k16BitIn                    (1 << 2)
  107. #define kStereoIn                    (1 << 3)
  108. #define k8BitRawOut                    (1 << 8)
  109. #define k8BitTwosOut                (1 << 9)
  110. #define k16BitOut                    (1 << 10)
  111. #define kStereoOut                    (1 << 11)
  112.  
  113.  
  114. #define kReverse                    0x00010000   /* (1L << 16) */ /*function description*/
  115. #define kRateConvert                0x00020000   /* (1L << 17) */
  116. #define kCreateSoundSource            0x00040000   /* (1L << 18) */
  117.  
  118.  
  119. #define kHighQuality                0x00400000   /* (1L << 22) */ /*performance description*/
  120. #define kRealTime                    0x00800000   /* (1L << 23) */
  121.  
  122.  
  123. #ifndef rez
  124.  
  125. enum {
  126. /*sound component set/get info selectors*/
  127.     siVolume                    = 'volu',
  128.     siHardwareVolume            = 'hvol',
  129.     siSpeakerVolume                = 'svol',
  130.     siHeadphoneVolume            = 'pvol',
  131.     siHardwareVolumeSteps        = 'hstp',
  132.     siHeadphoneVolumeSteps        = 'hdst',
  133.     siHardwareMute                = 'hmut',
  134.     siSpeakerMute                = 'smut',
  135.     siHeadphoneMute                = 'pmut',
  136.     siRateMultiplier            = 'rmul',
  137.     siQuality                    = 'qual',
  138. /*format types*/
  139.     kOffsetBinary                = 'raw ',
  140.     kTwosComplement                = 'twos',
  141.     kMACE3Compression            = 'MAC3',
  142.     kMACE6Compression            = 'MAC6'
  143. };
  144.  
  145. /*quality flags*/
  146. enum {
  147. /*use interpolation in rate conversion*/
  148.     kBestQuality                = (1 << 0)
  149. };
  150.  
  151. enum {
  152. /*useful bit masks*/
  153.     kInputMask                    = 0x000000FF,                    /*masks off input bits*/
  154.     kOutputMask                    = 0x0000FF00,                    /*masks off output bits*/
  155.     kOutputShift                = 8,                            /*amount output bits are shifted*/
  156.     kActionMask                    = 0x00FF0000,                    /*masks off action bits*/
  157.     kSoundComponentBits            = 0x00FFFFFF
  158. };
  159.  
  160. enum {
  161. /*SoundComponentPlaySourceBuffer action flags*/
  162.     kSourcePaused                = (1 << 0),
  163.     kPassThrough                = (1L << 16),
  164.     kNoSoundComponentChain        = (1L << 17),
  165. /*flags for OpenMixerSoundComponent*/
  166.     kNoMixing                    = (1 << 0),                        /*don't mix source*/
  167.     kNoSampleRateConversion        = (1 << 1),                        /*don't convert sample rate (i.e. 11 kHz -> 22 kHz)*/
  168.     kNoSampleSizeConversion        = (1 << 2),                        /*don't convert sample size (i.e. 16 -> 8)*/
  169.     kNoSampleFormatConversion    = (1 << 3),                        /*don't convert sample format (i.e. 'twos' -> 'raw ')*/
  170.     kNoChannelConversion        = (1 << 4),                        /*don't convert stereo/mono*/
  171.     kNoDecompression            = (1 << 5),                        /*don't decompress (i.e. 'MAC3' -> 'raw ')*/
  172.     kNoVolumeConversion            = (1 << 6),                        /*don't apply volume*/
  173.     kNoRealtimeProcessing        = (1 << 7)                        /*won't run at interrupt time*/
  174. };
  175.  
  176. /*Audio Component constants*/
  177. enum {
  178. /*Values for whichChannel parameter*/
  179.     audioAllChannels            = 0,                            /*All channels (usually interpreted as both left and right)*/
  180.     audioLeftChannel            = 1,                            /*Left channel*/
  181.     audioRightChannel            = 2,                            /*Right channel*/
  182. /*Values for mute parameter*/
  183.     audioUnmuted                = 0,                            /*Device is unmuted*/
  184.     audioMuted                    = 1,                            /*Device is muted*/
  185. /*Capabilities flags definitions*/
  186.     audioDoesMono                = (1L << 0),                    /*Device supports mono output*/
  187.     audioDoesStereo                = (1L << 1),                    /*Device supports stereo output*/
  188.     audioDoesIndependentChannels = (1L << 2)                    /*Device supports independent software control of each channel*/
  189. };
  190.  
  191. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  192. /* typedefs*/
  193. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  194.  
  195.  
  196. /*ShortFixed consists of an 8 bit, 2's complement integer part in the high byte,*/
  197. /*with an 8 bit fractional part in the low byte; its range is -128 to 127.99609375*/
  198. typedef short ShortFixed;
  199.  
  200. typedef struct SoundComponentData SoundComponentData;
  201.  
  202. typedef struct SoundComponentData *SoundComponentDataPtr;
  203.  
  204. struct SoundComponentData {
  205.     long                            flags;
  206.     OSType                            format;
  207.     short                            numChannels;
  208.     short                            sampleSize;
  209.     UnsignedFixed                    sampleRate;
  210.     long                            sampleCount;
  211.     Byte                            *buffer;
  212.     long                            reserved;
  213. };
  214. typedef struct SoundParamBlock SoundParamBlock;
  215.  
  216. typedef SoundParamBlock *SoundParamBlockPtr;
  217.  
  218. typedef pascal Boolean (*SoundParamProcPtr)(SoundParamBlockPtr *pb);
  219.  
  220. #if GENERATINGCFM
  221. typedef UniversalProcPtr SoundParamUPP;
  222. #else
  223. typedef SoundParamProcPtr SoundParamUPP;
  224. #endif
  225.  
  226. struct SoundParamBlock {
  227.     long                            recordSize;                    /*size of this record in bytes*/
  228.     SoundComponentData                desc;                        /*description of sound buffer*/
  229.     UnsignedFixed                    rateMultiplier;                /*rate multiplier to apply to sound*/
  230.     short                            leftVolume;                    /*volumes to apply to sound*/
  231.     short                            rightVolume;
  232.     long                            quality;                    /*quality to apply to sound*/
  233.     ComponentInstance                filter;                        /*filter to apply to sound*/
  234.     SoundParamUPP                    moreRtn;                    /*routine to call to get more data*/
  235.     SoundParamUPP                    completionRtn;                /*routine to call when buffer is complete*/
  236.     long                            refCon;                        /*user refcon*/
  237.     short                            result;                        /*result*/
  238. };
  239. typedef struct privateSoundSource *SoundSource;
  240.  
  241. struct AudioInfo {
  242.     long                            capabilitiesFlags;            /*Describes device capabilities*/
  243.     long                            reserved;                    /*Reserved by Apple*/
  244.     unsigned short                    numVolumeSteps;                /*Number of significant increments between min and max volume*/
  245. };
  246. typedef struct AudioInfo AudioInfo;
  247.  
  248. typedef AudioInfo *AudioInfoPtr;
  249.  
  250. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  251. /* functions for sound components*/
  252. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  253. /*Sound Component dispatch selectors*/
  254.  
  255. enum {
  256. /*these calls cannot be delegated*/
  257.     kSoundComponentInitOutputDeviceSelect = 1,
  258.     kSoundComponentSetSourceSelect = 2,
  259.     kSoundComponentGetSourceSelect = 3,
  260.     kSoundComponentGetSourceDataSelect = 4,
  261.     kSoundComponentSetOutputSelect = 5,
  262.     kDelegatedSoundComponentSelectors = 0x0100,                    /*first selector that can be delegated up the chain*/
  263. /*these calls can be delegated and have own range*/
  264.     kSoundComponentAddSourceSelect = kDelegatedSoundComponentSelectors + 1,
  265.     kSoundComponentRemoveSourceSelect = kDelegatedSoundComponentSelectors + 2,
  266.     kSoundComponentGetInfoSelect = kDelegatedSoundComponentSelectors + 3,
  267.     kSoundComponentSetInfoSelect = kDelegatedSoundComponentSelectors + 4,
  268.     kSoundComponentStartSourceSelect = kDelegatedSoundComponentSelectors + 5,
  269.     kSoundComponentStopSourceSelect = kDelegatedSoundComponentSelectors + 6,
  270.     kSoundComponentPauseSourceSelect = kDelegatedSoundComponentSelectors + 7,
  271.     kSoundComponentPlaySourceBufferSelect = kDelegatedSoundComponentSelectors + 8
  272. };
  273.  
  274. /*Audio Component selectors*/
  275. enum {
  276.     kAudioGetVolumeSelect        = 0,
  277.     kAudioSetVolumeSelect        = 1,
  278.     kAudioGetMuteSelect            = 2,
  279.     kAudioSetMuteSelect            = 3,
  280.     kAudioSetToDefaultsSelect    = 4,
  281.     kAudioGetInfoSelect            = 5,
  282.     kAudioGetBassSelect            = 6,
  283.     kAudioSetBassSelect            = 7,
  284.     kAudioGetTrebleSelect        = 8,
  285.     kAudioSetTrebleSelect        = 9,
  286.     kAudioGetOutputDeviceSelect    = 10,
  287.     kAudioMuteOnEventSelect        = 129
  288. };
  289.  
  290.  
  291.  
  292. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  293. /* Sound Manager 3.0 utilities*/
  294. extern pascal OSErr OpenMixerSoundComponent(SoundComponentDataPtr outputDescription, long outputFlags, ComponentInstance *mixerComponent)
  295.  FOURWORDINLINE(0x203C, 0x0614, 0x0018, 0xA800);
  296. extern pascal OSErr CloseMixerSoundComponent(ComponentInstance ci)
  297.  FOURWORDINLINE(0x203C, 0x0218, 0x0018, 0xA800);
  298.  
  299.  
  300. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  301. /* basic sound component functions*/
  302. extern pascal ComponentResult SoundComponentInitOutputDevice(ComponentInstance ti, long actions)
  303.  FIVEWORDINLINE(0x2F3C, 4, 1, 0x7000, 0xA82A);
  304. extern pascal ComponentResult SoundComponentSetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance source)
  305.  FIVEWORDINLINE(0x2F3C, 8, 2, 0x7000, 0xA82A);
  306. extern pascal ComponentResult SoundComponentGetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance *source)
  307.  FIVEWORDINLINE(0x2F3C, 8, 3, 0x7000, 0xA82A);
  308. extern pascal ComponentResult SoundComponentGetSourceData(ComponentInstance ti, SoundComponentDataPtr *sourceData)
  309.  FIVEWORDINLINE(0x2F3C, 4, 4, 0x7000, 0xA82A);
  310. extern pascal ComponentResult SoundComponentSetOutput(ComponentInstance ti, SoundComponentDataPtr requested, SoundComponentDataPtr *actual)
  311.  FIVEWORDINLINE(0x2F3C, 8, 5, 0x7000, 0xA82A);
  312.  
  313.  
  314. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  315. /* junction methods for the mixer, must be called at non-interrupt level*/
  316. extern pascal ComponentResult SoundComponentAddSource(ComponentInstance ti, SoundSource *sourceID)
  317.  FIVEWORDINLINE(0x2F3C, 4, 0x0101, 0x7000, 0xA82A);
  318. extern pascal ComponentResult SoundComponentRemoveSource(ComponentInstance ti, SoundSource sourceID)
  319.  FIVEWORDINLINE(0x2F3C, 4, 0x0102, 0x7000, 0xA82A);
  320.  
  321.  
  322. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  323. /* info methods*/
  324. extern pascal ComponentResult SoundComponentGetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  325.  FIVEWORDINLINE(0x2F3C, 12, 0x0103, 0x7000, 0xA82A);
  326. extern pascal ComponentResult SoundComponentSetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  327.  FIVEWORDINLINE(0x2F3C, 12, 0x0104, 0x7000, 0xA82A);
  328.  
  329.  
  330. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  331. /* control methods*/
  332. extern pascal ComponentResult SoundComponentStartSource(ComponentInstance ti, short count, SoundSource *sources)
  333.  FIVEWORDINLINE(0x2F3C, 6, 0x0105, 0x7000, 0xA82A);
  334. extern pascal ComponentResult SoundComponentStopSource(ComponentInstance ti, short count, SoundSource *sources)
  335.  FIVEWORDINLINE(0x2F3C, 6, 0x0106, 0x7000, 0xA82A);
  336. extern pascal ComponentResult SoundComponentPauseSource(ComponentInstance ti, short count, SoundSource *sources)
  337.  FIVEWORDINLINE(0x2F3C, 6, 0x0107, 0x7000, 0xA82A);
  338. extern pascal ComponentResult SoundComponentPlaySourceBuffer(ComponentInstance ti, SoundSource sourceID, SoundParamBlockPtr pb, long actions)
  339.  FIVEWORDINLINE(0x2F3C, 12, 0x0108, 0x7000, 0xA82A);
  340.  
  341.  
  342. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  343. /* interface for Audio Components*/
  344. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  345.  
  346.  
  347. /*Volume is described as a value between 0 and 1, with 0 indicating minimum
  348.   volume and 1 indicating maximum volume; if the device doesn't support
  349.   software control of volume, then a value of unimpErr is returned, indicating
  350.   that these functions are not supported by the device*/
  351.  
  352.  
  353. extern pascal ComponentResult AudioGetVolume(ComponentInstance ac, short whichChannel, ShortFixed *volume)
  354.  FIVEWORDINLINE(0x2F3C, 6, 0, 0x7000, 0xA82A);
  355. extern pascal ComponentResult AudioSetVolume(ComponentInstance ac, short whichChannel, ShortFixed volume)
  356.  FIVEWORDINLINE(0x2F3C, 4, 1, 0x7000, 0xA82A);
  357.  
  358.  
  359. /*If the device doesn't support software control of mute, then a value of unimpErr is*/
  360. /*returned, indicating that these functions are not supported by the device*/
  361. extern pascal ComponentResult AudioGetMute(ComponentInstance ac, short whichChannel, short *mute)
  362.  FIVEWORDINLINE(0x2F3C, 6, 2, 0x7000, 0xA82A);
  363. extern pascal ComponentResult AudioSetMute(ComponentInstance ac, short whichChannel, short mute)
  364.  FIVEWORDINLINE(0x2F3C, 4, 3, 0x7000, 0xA82A);
  365.  
  366.  
  367. /*AudioSetToDefaults causes the associated device to reset its volume and mute values*/
  368. /*(and perhaps other characteristics, e.g. attenuation) to "factory default" settings*/
  369. extern pascal ComponentResult AudioSetToDefaults(ComponentInstance ac)
  370.  FIVEWORDINLINE(0x2F3C, 0, 4, 0x7000, 0xA82A);
  371.  
  372.  
  373. /*This routine is required; it must be implemented by all audio components*/
  374. extern pascal ComponentResult AudioGetInfo(ComponentInstance ac, AudioInfoPtr info)
  375.  FIVEWORDINLINE(0x2F3C, 4, 5, 0x7000, 0xA82A);
  376. extern pascal ComponentResult AudioGetBass(ComponentInstance ac, short whichChannel, short *bass)
  377.  FIVEWORDINLINE(0x2F3C, 6, 6, 0x7000, 0xA82A);
  378. extern pascal ComponentResult AudioSetBass(ComponentInstance ac, short whichChannel, short bass)
  379.  FIVEWORDINLINE(0x2F3C, 4, 7, 0x7000, 0xA82A);
  380. extern pascal ComponentResult AudioGetTreble(ComponentInstance ac, short whichChannel, short *Treble)
  381.  FIVEWORDINLINE(0x2F3C, 6, 8, 0x7000, 0xA82A);
  382. extern pascal ComponentResult AudioSetTreble(ComponentInstance ac, short whichChannel, short Treble)
  383.  FIVEWORDINLINE(0x2F3C, 4, 9, 0x7000, 0xA82A);
  384. extern pascal ComponentResult AudioGetOutputDevice(ComponentInstance ac, Component *outputDevice)
  385.  FIVEWORDINLINE(0x2F3C, 4, 10, 0x7000, 0xA82A);
  386.  
  387.  
  388. /*This is routine is private to the AudioVision component.  It enables the watching of the mute key.*/
  389. extern pascal ComponentResult AudioMuteOnEvent(ComponentInstance ac, short muteOnEvent)
  390.  FIVEWORDINLINE(0x2F3C, 2, 129, 0x7000, 0xA82A);
  391.  
  392.  
  393. enum {
  394.     uppSoundParamProcInfo = kPascalStackBased
  395.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  396.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SoundParamBlockPtr*)))
  397. };
  398.  
  399. #if GENERATINGCFM
  400. #define NewSoundParamProc(userRoutine)        \
  401.         (SoundParamUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSoundParamProcInfo, GetCurrentArchitecture())
  402. #else
  403. #define NewSoundParamProc(userRoutine)        \
  404.         ((SoundParamUPP) (userRoutine))
  405. #endif
  406.  
  407. #if GENERATINGCFM
  408. #define CallSoundParamProc(userRoutine, pb)        \
  409.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSoundParamProcInfo, (pb))
  410. #else
  411. #define CallSoundParamProc(userRoutine, pb)        \
  412.         (*(userRoutine))((pb))
  413. #endif
  414.  
  415.  
  416. #if PRAGMA_IMPORT_SUPPORTED
  417. #pragma import off
  418. #endif
  419.  
  420. #if PRAGMA_ALIGN_SUPPORTED
  421. #pragma options align=reset
  422. #endif
  423.  
  424. #ifdef __cplusplus
  425. }
  426. #endif
  427.  
  428. #endif /* rez */
  429. #endif /* __SOUNDCOMPONENTS__ */
  430.